package servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import dto.ResponseDto;
import pojo.MerchantApplication;
import service.MerchantApplicationManager;
import service.factory.ManagerFactory;
import util.JsonUtil;

public class LoadWaitAuditDatailServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
    private MerchantApplicationManager manager = null;
    
    public LoadWaitAuditDatailServlet() {
        super();
        manager = ManagerFactory.getApplicationManagerInstance();
    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String name = request.getParameter("name");
		MerchantApplication merchant = manager.getByName(name);
		request.setAttribute("merchant", merchant);
		request.setAttribute("PASS", MerchantApplication.WHITE_LIST);
		request.setAttribute("REJECT", MerchantApplication.REJECT);
		request.getRequestDispatcher("/merchantDetail.jsp").forward(request, response);
	}
}
